// @ts-nocheck
import { ApplyPluginsType, dynamic } from 'D:/work/UI/antd5/create/node_modules/_@umijs_runtime@3.2.10@@umijs/runtime';
import { plugin } from './plugin';

const routes = [
  {
    "path": "/",
    "component": dynamic({ loader: () => import(/* webpackChunkName: '.umi__plugin-setting-drawer__SettingDrawer' */'D:/work/UI/antd5/create/src/.umi/plugin-setting-drawer/SettingDrawer.tsx'), loading: require('@/components/PageLoading/index').default}),
    "routes": [
      {
        "path": "/",
        "component": dynamic({ loader: () => import(/* webpackChunkName: '.umi__plugin-layout__Layout' */'D:/work/UI/antd5/create/src/.umi/plugin-layout/Layout.tsx'), loading: require('@/components/PageLoading/index').default}),
        "routes": [
          {
            "path": "/user",
            "layout": false,
            "routes": [
              {
                "name": "login",
                "path": "/user/login",
                "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__user__login' */'D:/work/UI/antd5/create/src/pages/user/login'), loading: require('@/components/PageLoading/index').default}),
                "exact": true
              }
            ]
          },
          {
            "path": "/welcome",
            "name": "welcome",
            "icon": "smile",
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__Welcome' */'D:/work/UI/antd5/create/src/pages/Welcome'), loading: require('@/components/PageLoading/index').default}),
            "exact": true
          },
          {
            "path": "/admin",
            "name": "admin",
            "icon": "crown",
            "access": "canAdmin",
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__Admin' */'D:/work/UI/antd5/create/src/pages/Admin'), loading: require('@/components/PageLoading/index').default}),
            "routes": [
              {
                "path": "/admin/sub-page",
                "name": "sub-page",
                "icon": "smile",
                "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__Welcome' */'D:/work/UI/antd5/create/src/pages/Welcome'), loading: require('@/components/PageLoading/index').default}),
                "exact": true
              }
            ]
          },
          {
            "name": "list.table-list",
            "icon": "table",
            "path": "/list",
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__ListTableList' */'D:/work/UI/antd5/create/src/pages/ListTableList'), loading: require('@/components/PageLoading/index').default}),
            "exact": true
          },
          {
            "path": "/swagger",
            "name": "swagger",
            "icon": "dashboard",
            "routes": [
              {
                "name": "配置",
                "icon": "smile",
                "path": "/swagger/config",
                "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__swagger__config' */'D:/work/UI/antd5/create/src/pages/swagger/config'), loading: require('@/components/PageLoading/index').default}),
                "exact": true
              },
              {
                "name": "文档管理",
                "icon": "smile",
                "path": "/swagger/doc",
                "routes": [
                  {
                    "name": "接口文档模板",
                    "icon": "smile",
                    "path": "/swagger/doc/template",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__swagger__doc__template' */'D:/work/UI/antd5/create/src/pages/swagger/doc/template'), loading: require('@/components/PageLoading/index').default}),
                    "exact": true
                  },
                  {
                    "name": "markdown接口文档",
                    "icon": "smile",
                    "path": "/:swagger/doc/:id",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__swagger__doc__markdown' */'D:/work/UI/antd5/create/src/pages/swagger/doc/markdown'), loading: require('@/components/PageLoading/index').default}),
                    "exact": true
                  },
                  {
                    "name": "word接口文档",
                    "icon": "smile",
                    "path": "/:swagger/doc/:id",
                    "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__swagger__doc__word' */'D:/work/UI/antd5/create/src/pages/swagger/doc/word'), loading: require('@/components/PageLoading/index').default}),
                    "exact": true
                  }
                ]
              },
              {
                "name": "接口调试",
                "icon": "smile",
                "exact": true,
                "path": "/swagger/apidebug/:key",
                "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__swagger__apidebug' */'D:/work/UI/antd5/create/src/pages/swagger/apidebug'), loading: require('@/components/PageLoading/index').default})
              }
            ]
          },
          {
            "path": "/",
            "redirect": "/welcome",
            "exact": true
          },
          {
            "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'D:/work/UI/antd5/create/src/pages/404'), loading: require('@/components/PageLoading/index').default}),
            "exact": true
          }
        ]
      }
    ]
  }
];

// allow user to extend routes
plugin.applyPlugins({
  key: 'patchRoutes',
  type: ApplyPluginsType.event,
  args: { routes },
});

export { routes };
